package lab02.test19;

import java.util.Scanner;

public class HelloWord {
    public static void main(String[] args) {
        System.out.println("请输入您想要改变的字符：");
        Scanner sc=new Scanner(System.in);
        String string=sc.next();
        StringBuffer stringBuffer=new StringBuffer();

        for (int i=0;i<string.length();i++){
            char tmp=string.charAt(i);
            if (tmp>='A'&&tmp<='Z'){
                tmp=(char)(tmp+32);
                stringBuffer.append(tmp);
            }else if (tmp>='a'&&tmp<='z'){
                tmp=(char)(tmp-32);
                stringBuffer.append(tmp);
            }
        }
        System.out.println(stringBuffer.reverse());
    }
}
